package com.demo.project.utils;

import com.demo.project.entity.Team;

import java.util.UUID;

public class StringUtils {
    /**
     * 拼接字符串
     * @param account
     * @param password
     * @return
     */
    public static String getAccountPassword(String account,String password){
        return account+"-"+password;
    }

    /**
     * 得到随机的用户id
     * @return
     */
    public static String getRandomId(){
        return UUID.randomUUID().toString();
    }

    public static String generateTeamId(Team team){
        String ret = team.getDeparture()+"-"+team.getDestination()+"|"+team.getStart()+"-"+team.getEnd()+"|"+team.getId();
        return ret;
    }
    public static String generateTeamVoId(com.demo.project.entity.vo.Team team){

        String ret = team.getDeparture()+"-"+team.getDestination()+"|"+team.getStart()+"-"+team.getEnd()+"|";
        return ret;
    }

}
